package com.baida.retail.tasksystem.service.impl;

import com.baida.retail.tasksystem.dao.OrderDao;
import com.baida.retail.tasksystem.entity.Order;
import com.baida.retail.tasksystem.enums.ErrorCode;
import com.baida.retail.tasksystem.message.logic.Result;
import com.baida.retail.tasksystem.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;

    @Override
    public Result getOrderById(Long orderId) {
        Order retOrder = orderDao.getById(orderId);

        return new Result(ErrorCode.SUCCESS, retOrder);
    }
}
